package com.lanou.dllo.findfood.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.lanou.dllo.findfood.R;
import com.lanou.dllo.findfood.tools.ToastCommon;

/**
 * Created by dllo on 15/10/26.
 */
public class ISLoginActivity extends Activity implements View.OnClickListener {
    private TextView display,login,register;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.actitity_login);
        initView();
    }
  private void   initView(){
      display = (TextView) findViewById(R.id.display);
      display.setOnClickListener(this);
      login = (TextView) findViewById(R.id.logined);
      login.setOnClickListener(this);
      register = (TextView) findViewById(R.id.registered);
      register.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.display:
                ToastCommon.createToastConfig().ToastShow(this, (ViewGroup)
                        findViewById(R.id.toast_layout_root), "您还没有登录");
            break;
            case R.id.logined:
                startActivity(new Intent(this, LoginAvtivtiy.class));
                finish();
                break;
            case R.id.registered:
                startActivity(new Intent(this, RegisteredActivity.class));
                finish();
                break;
            default:
                break;
        }

    }
}
